<?php

session_start();

if (isset($_REQUEST['id']) && isset($_SESSION['user_id']) && $_SESSION['spec_captcha']===false){

    include_once "../../../classes/cms_admin.php";
    $CMS_A = new cms_admin();
    $flag = $CMS_A->change_visible($_REQUEST['id']);

    $result = array(
        'error' => 0,
        'flag'  => $flag,
    );

}else{
    $result = array(
        'error' => 1,
        'description' => "no auth"
    );
}

echo json_encode($result);